Add udev rules that map similar to the hotplug agent. Based off of what
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 7 Oct 2005 12:15:52 +0000 (13:15 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 7 Oct 2005 12:15:52 +0000 (13:15 +0100)
Chris Bainbridge posted the end of last week but doing things as
directly as possible.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
tools/examples/xen-backend.rules [new file with mode: 0644]

diff --git a/tools/examples/xen-backend.rules b/tools/examples/xen-backend.rules
new file mode 100644 (file)
index 0000000..3eb5a7d
--- /dev/null
@@ -0,0 +1,4 @@
+SUBSYSTEM=="xen-backend", KERNEL=="vbd*", ACTION=="add", RUN+="/etc/xen/scripts/block bind"
+SUBSYSTEM=="xen-backend", KERNEL=="vbd*", ACTION=="remove", RUN+="/etc/xen/scripts/block unbind"
+SUBSYSTEM=="xen-backend", KERNEL=="vif*", ENV{PHYSDEVDRIVER}=="vif", ACTION=="online", RUN+="$env{script} up"
+SUBSYSTEM=="xen-backend", ACTION=="remove", RUN+="/usr/bin/xenstore-rm $env{XENBUS_PATH}"